#include <stdio.h>
#include <gmp.h>


int main(int argc, char* argv[])
{
	// IS PRIME ?
	mpz_t num1;
	char input_str[1000];
	int result;

	mpz_init(num1);

	// No numbers given yet
	if(argc == 1){
		printf("Type a number: ");
		gets(input_str);
		mpz_set_str(num1, input_str, 10);
	} else {
		mpz_set_str(num1, argv[1], 10);
	}

	// result = 
	result = mpz_probab_prime_p(num1, 5);
	switch(result){
		case 2: // definitly prime 
			printf("true\n");
			break;
		case 1: // probably prime
			printf("maybe\n");
			break;
		case 0: // definitly not prime
			printf("false\n");
			break;
		default:
			printf("false\n");
			break;
	}

	mpz_clear(num1);
	return 0;
}